﻿using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using EntityFrameWorkTest.Models.Mapping;
using EntityFrameWorkTest.Models;

namespace EntityFrameWorkTest
{
    public partial class DiverContext : DbContext
    {
        static DiverContext()
        {
            Database.SetInitializer<DiverContext>(null);
        }

        public DiverContext()
            : base("Name=DiverContext")
        {
        }

        public DbSet<Diver> Divers { get; set; }
        public DbSet<Jump> Jumps { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new DiverMap());
            modelBuilder.Configurations.Add(new JumpMap());
        }
    }
}
